local m = require('helper.neotree')

return {
    find_files = function(state)
        m.do_setcd(state)
        require('telescope.builtin').find_files()
    end,
    grep = function(state)
        m.do_setcd(state)
        require('telescope.builtin').live_grep({additional_args = function() return {"--max-count=1","--fixed-strings"} end})
    end,
    copy_path_or_file_name = function(state)
        local p = m.get_path_or_file_name(state)
        require('utils.editor').copy(p)
        require("notify")(p .. " copied.")
    end,
    spectre = function(state)
        local p = m.do_setcd(state)
        require('spectre').open({
            is_insert_mode = true,
            cwd = p,
            is_close = false, -- close an exists instance of spectre and open new
        })
        vim.cmd("Neotree close")
    end,
    -- hop = function()
    --     require('hop').hint_lines()
    -- end,
}
-- EOP
